import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginView from '../views/LoginView.vue'
import ProfileView from '../views/ProfileView.vue'
import AiView from '../views/Ai.vue'
import QuestionnaireList from '../views/questionnaire/QuestionnaireList.vue'
import QuestionnaireDetail from '../views/questionnaire/QuestionnaireDetail.vue'
import QuestionnaireSuccess from '../views/questionnaire/QuestionnaireSuccess.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      name: 'login',
      component: LoginView
    },
    {
      path: '/home',
      name: 'home',
      component: HomeView
    },
    {
      path: '/profile',
      name: 'profile',
      component: ProfileView
    },
    {
      path: '/ai',
      name: 'ai',
      component: AiView
    },
    {
      path: '/questionnaire',
      name: 'questionnaire',
      component: QuestionnaireList
    },
    {
      path: '/questionnaire/:id',
      name: 'questionnaire-detail',
      component: QuestionnaireDetail
    },
    {
      path: '/questionnaire/:id/success',
      name: 'questionnaire-success',
      component: QuestionnaireSuccess
    }
  ],
})

export default router
